import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/education/couser_center/list_question_by_book_id_entity.dart';

ListQuestionByBookIdEntity $ListQuestionByBookIdEntityFromJson(Map<String, dynamic> json) {
  final ListQuestionByBookIdEntity listQuestionByBookIdEntity = ListQuestionByBookIdEntity();
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    listQuestionByBookIdEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    listQuestionByBookIdEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    listQuestionByBookIdEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    listQuestionByBookIdEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    listQuestionByBookIdEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    listQuestionByBookIdEntity.id = id;
  }
  final String? myValidity = jsonConvert.convert<String>(json['myValidity']);
  if (myValidity != null) {
    listQuestionByBookIdEntity.myValidity = myValidity;
  }
  final String? optionA = jsonConvert.convert<String>(json['optionA']);
  if (optionA != null) {
    listQuestionByBookIdEntity.optionA = optionA;
  }
  final String? optionB = jsonConvert.convert<String>(json['optionB']);
  if (optionB != null) {
    listQuestionByBookIdEntity.optionB = optionB;
  }
  final String? optionC = jsonConvert.convert<String>(json['optionC']);
  if (optionC != null) {
    listQuestionByBookIdEntity.optionC = optionC;
  }
  final String? optionD = jsonConvert.convert<String>(json['optionD']);
  if (optionD != null) {
    listQuestionByBookIdEntity.optionD = optionD;
  }
  final String? parsing = jsonConvert.convert<String>(json['parsing']);
  if (parsing != null) {
    listQuestionByBookIdEntity.parsing = parsing;
  }
  final String? questionMain = jsonConvert.convert<String>(json['questionMain']);
  if (questionMain != null) {
    listQuestionByBookIdEntity.questionMain = questionMain;
  }
  final String? questionTypeDicId = jsonConvert.convert<String>(json['questionTypeDicId']);
  if (questionTypeDicId != null) {
    listQuestionByBookIdEntity.questionTypeDicId = questionTypeDicId;
  }
  final String? questionTypeDicName = jsonConvert.convert<String>(json['questionTypeDicName']);
  if (questionTypeDicName != null) {
    listQuestionByBookIdEntity.questionTypeDicName = questionTypeDicName;
  }
  final String? questionValidity = jsonConvert.convert<String>(json['questionValidity']);
  if (questionValidity != null) {
    listQuestionByBookIdEntity.questionValidity = questionValidity;
  }
  final int? score = jsonConvert.convert<int>(json['score']);
  if (score != null) {
    listQuestionByBookIdEntity.score = score;
  }
  final String? textbookId = jsonConvert.convert<String>(json['textbookId']);
  if (textbookId != null) {
    listQuestionByBookIdEntity.textbookId = textbookId;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    listQuestionByBookIdEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    listQuestionByBookIdEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    listQuestionByBookIdEntity.updateDate = updateDate;
  }
  return listQuestionByBookIdEntity;
}

Map<String, dynamic> $ListQuestionByBookIdEntityToJson(ListQuestionByBookIdEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['myValidity'] = entity.myValidity;
  data['optionA'] = entity.optionA;
  data['optionB'] = entity.optionB;
  data['optionC'] = entity.optionC;
  data['optionD'] = entity.optionD;
  data['parsing'] = entity.parsing;
  data['questionMain'] = entity.questionMain;
  data['questionTypeDicId'] = entity.questionTypeDicId;
  data['questionTypeDicName'] = entity.questionTypeDicName;
  data['questionValidity'] = entity.questionValidity;
  data['score'] = entity.score;
  data['textbookId'] = entity.textbookId;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension ListQuestionByBookIdEntityExtension on ListQuestionByBookIdEntity {
  ListQuestionByBookIdEntity copyWith({
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? id,
    String? myValidity,
    String? optionA,
    String? optionB,
    String? optionC,
    String? optionD,
    String? parsing,
    String? questionMain,
    String? questionTypeDicId,
    String? questionTypeDicName,
    String? questionValidity,
    int? score,
    String? textbookId,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return ListQuestionByBookIdEntity()
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..myValidity = myValidity ?? this.myValidity
      ..optionA = optionA ?? this.optionA
      ..optionB = optionB ?? this.optionB
      ..optionC = optionC ?? this.optionC
      ..optionD = optionD ?? this.optionD
      ..parsing = parsing ?? this.parsing
      ..questionMain = questionMain ?? this.questionMain
      ..questionTypeDicId = questionTypeDicId ?? this.questionTypeDicId
      ..questionTypeDicName = questionTypeDicName ?? this.questionTypeDicName
      ..questionValidity = questionValidity ?? this.questionValidity
      ..score = score ?? this.score
      ..textbookId = textbookId ?? this.textbookId
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
